function animate(box,op,time) {
    clearInterval(box.timer)
    if(op<=0){
        box.style['display'] = 'block'
        box.timer = setInterval(function(){
            op+=0.09
            box.style['opacity'] = op
            if(op>=1){
                console.log('加载完毕')
                clearInterval(box.timer)
            }
        },time)
        
    }else{
        box.timer = setInterval(function(){
            op-=0.09
            box.style['opacity'] = op
            if(op<=0){
                box.style['display'] = 'none'
                clearInterval(box.timer)
            }
        },time)
        
    }
}
export default animate